package com.zhiwen.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @Auther: wuzhiwen
 * @Date: 2019/1/21 14:51
 * @Description:
 */
//ConditionalOnProperty("demo.data.enabled")
@ConfigurationProperties(prefix = "demo.data")
@Component("demoConfig")
public class DemoConfig {
    private String name;
    private String age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Demo{" +
                "name='" + name + '\'' +
                ", age='" + age + '\'' +
                '}';
    }
}
